package t10086.Repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import t10086.Model.Entity.Robot;

import java.util.Optional;

//Mapper Interface
public interface RobotRepository extends JpaRepository<Robot, String> {
    // 你可以根据需求添加自定义查询方法
    @Query("select r from Robot r WHERE r.serialNumber = :serialNumber")
    Optional<Robot> getRobotBySerialNumber(@Param("serialNumber") Long serialNumber);

}